//position定位
//定位类型
$position-types: (
  re: relative,
  ab: absolute,
  fixed: fixed
);

@each $typeKey, $type in $position-types {
  /* 
  .position-re {
    position: relative;
  }
  */
  .position-#{$typeKey} {
    position: $type;
  }
}

//定位方向
$position-directions: (
  t: top,
  l: left,
  b: bottom,
  r: right
);

//定位位置
$position-sizes: (
  d3: .3rem,
  5p: 5%,
  20p: 20%,
  30p: 30%
);

@each $directionKey, $direction in $position-directions {
  @each $sizeKey, $size in $position-sizes {
    /* 
    .position-t-0 {
      top: 0;
    }
  */
    .position-#{$directionKey}-#{$sizeKey} {
      #{$direction}: $size;
    }
  }
}
